Lamp Data

This module provides control over Lamp Data objects in Blender.

Example:

 from Blender import Lamp
 l = Lamp.New('Spot')            # create new 'Spot' lamp data
 l.setMode('square', 'shadow')   # set these two lamp mode flags
 ob = Object.New('Lamp')         # create new lamp object
 ob.link(l)                      # link lamp obj with lamp data
    

Classes

Lamp

This object gives access to Lamp-specific data in Blender.

Function Summary

Blender Lamp or a list of Blender Lamps

Get(name)

Get the Lamp Data object(s) from Blender.

Blender Lamp

New(type, name)

Create a new Lamp Data object.

Function Details

Get(name=None)

Get the Lamp Data object(s) from Blender.

Parameters:

name - The name of the Lamp Data.

áááááááááá (type=string)

Returns:

It depends on the name parameter:

  • (name): The Lamp Data object with the given name;

  • (): A list with all Lamp Data objects in the current scene.

áááááááááá (type=Blender Lamp or a list of Blender Lamps)

New(type='Lamp', name='LampData')

Create a new Lamp Data object.

Parameters:

type - The Lamp type: 'Lamp', 'Sun', 'Spot' or 'Hemi'.

áááááááááá (type=string)

name - The Lamp Data name.

áááááááááá (type=string)

Returns:

The created Lamp Data object.

áááááááááá (type=Blender Lamp)